
public class Test5 {
    public static void main(String[] args) throws Exception {
        int b = 2;
        int c = 4;
        int a = 0;
        try {
            a = 4 * c / b;
            System.out.println(a);
        } catch(ArithmeticException e) {
            System.out.println("除数为0!");
//            e.printStackTrace();
        }

//        System.out.println(a);
    }
}

//class NewException extends Exception {
//    public NewException() {
//        System.out.println("b为0!");
//    }
//}